package bb.lanxing.calc.data;

public class BiketrainerPoint implements Cloneable, RecycleData {
    private int biketrainerpower;
    private int biketrainercadence;
    private int biketrainercrank;
    private int biketrainereventtime;
    private int source = 2;

    public BiketrainerPoint copy(BiketrainerPoint reuse) {
        if (reuse == null) {
            reuse = new BiketrainerPoint();
        }
        reuse.biketrainerpower = this.biketrainerpower;
        reuse.biketrainercadence = this.biketrainercadence;
        reuse.biketrainercrank = this.biketrainercrank;
        reuse.biketrainereventtime = this.biketrainereventtime;
        reuse.source = this.source;
        return reuse;
    }

    public BiketrainerPoint clone() {
        try {
            return (BiketrainerPoint) super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
            return null;
        }
    }

    @Override
    public void recycle() {
        this.biketrainerpower = 0;
        this.biketrainercadence = 0;
        this.biketrainercrank = 0;
        this.biketrainereventtime = 0;
        this.source = 2;
    }

    public int getBiketrainerPower() {
        return this.biketrainerpower;
    }

    public void setBiketrainerPower(int biketrainerpower) {
        this.biketrainerpower = biketrainerpower;
    }

    public int getBiketrainerCadence() {
        return this.biketrainercadence;
    }

    public void setBiketrainerCadence(int biketrainercadence) {
        this.biketrainercadence = biketrainercadence;
    }

    public int getBiketrainerCrank() {
        return this.biketrainercrank;
    }

    public void setBiketrainerCrank(int biketrainercrank) {
        this.biketrainercrank = biketrainercrank;
    }

    public int getBiketrainerEventTime() {
        return this.biketrainereventtime;
    }

    public void setBiketrainerEventTime(int biketrainereventtime) {
        this.biketrainereventtime = biketrainereventtime;
    }

    public int getSource() {
        return this.source;
    }

    public void setSource(int source) {
        this.source = source;
    }
}
